#include<stdio.h>
#define PI 3.14159
int main()
{
	double r, h;
	scanf("%lf %lf", &r, &h);
	double s;
	s = 2*PI*r*r + 2*PI*r*h;
	printf("%.2f", s);
	return 0;
}
